package com.daybook.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.daybook.pojo.ShopCart;
import com.daybook.pojo.ShopCartAndBooks;

/**
 * 购物车dao层操作
 * */
public interface ShopCartMapper {
	//1.查询购物车表
	public ShopCart selectShopCartByBidAndUid(@Param(value = "shopCart")ShopCart shopCart);
	//2.添加购物车
	public int addNewCart(@Param(value = "shopCart")ShopCart shopCart);
	//3.更新购物车
	public int updateCartById(@Param(value = "shopCart")ShopCart shopCart);
	//3.2更新购物车书籍数量
	public int updateNumCartById(@Param(value = "shopCart")ShopCart shopCart);
	//4.删除单条购物车
	public int deleteOneCartById(@Param(value = "sid")int sid);
	//5.删除多条购物车
	public int deleteCartByListId(@Param(value = "sid_list") Integer[] sid_list);
	//6.查询我的购物车信息
	public List<ShopCartAndBooks> selectMyCartList(@Param(value = "uid")int uid);
}
